// import {combineReducers, createStore} from "redux";
import {combineReducers, createStore} from "../components/KRedux";

export const counterReducer = (state = 0, {type, payload = 1}) => {
    switch (type) {
        case 'add':
            return state + payload;
        case 'reduce':
            return state - payload
        default:
            return state
    }
}
export default createStore(combineReducers({count: counterReducer}) )